package com.kantboot.business.talent.web.controller;

import com.kantboot.business.talent.domain.entity.BusTalentExpertLevel;
import com.kantboot.business.talent.domain.vo.BusTalentExpertLevelHasCondition;
import com.kantboot.business.talent.service.IBusTalentExpertLevelService;
import com.kantboot.global.rest.result.CommonSuccessStateCodeAndMsg;
import com.kantboot.util.common.result.RestResult;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 关于 专家等级 的控制器
 * @author 方某方
 */
@RestController
@RequestMapping("/business-talent-web/expertLevel")
public class BusTalentExpertLevelController {

    @Resource
    private IBusTalentExpertLevelService service;

    /**
     * 获取所有专家等级
     * @return 所有专家等级
     */
    @RequestMapping("/getAll")
    public RestResult<List<BusTalentExpertLevel>> getAll() {
        return RestResult.success(service.getAll(), CommonSuccessStateCodeAndMsg.GET_SUCCESS);
    }

    /**
     * 获取所有专家等级及其条件
     * @return 所有专家等级及其条件
     */
    @RequestMapping("/getAllHasCondition")
    public RestResult<List<BusTalentExpertLevelHasCondition>> getAllHasCondition() {
        return RestResult.success(service.getAllHasCondition(), CommonSuccessStateCodeAndMsg.GET_SUCCESS);
    }

}
